%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/authenticateFail"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 11, 16<br /><br />1: PgSelect[8]<br />2: PgSelectRows[13]<br />ᐳ: 12, 14, 15"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 14, 8, 15<br /><br />ROOT Object{1}ᐸ{result}ᐳ[15]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2

    %% plan dependencies
    Object11{{"Object[11∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access9{{"Access[9∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access10{{"Access[10∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access9 & Access10 --> Object11
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access9
    __Value2 --> Access10
    ApplyInput16{{"ApplyInput[16∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput16
    PgSelect8[["PgSelect[8∈1] ➊<br />ᐸauthenticate_fail(mutation)ᐳ"]]:::sideeffectplan
    Object11 & ApplyInput16 --> PgSelect8
    First12{{"First[12∈1] ➊"}}:::plan
    PgSelectRows13[["PgSelectRows[13∈1] ➊"]]:::plan
    PgSelectRows13 --> First12
    PgSelect8 --> PgSelectRows13
    PgSelectSingle14{{"PgSelectSingle[14∈1] ➊<br />ᐸauthenticate_failᐳ"}}:::plan
    First12 --> PgSelectSingle14
    Object15{{"Object[15∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgSelectSingle14 --> Object15
    PgClassExpression17{{"PgClassExpression[17∈2] ➊<br />ᐸ__authenticate_fail__ᐳ"}}:::plan
    Object15 o--o PgClassExpression17

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,Access9,Access10,Object11,ApplyInput16 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgSelect8,First12,PgSelectRows13,PgSelectSingle14,Object15 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression17 bucket2

